Skip to content

Commit 437e956

Browse files
committed
Use gatsby-gh-pages-action for publish
Signed-off-by: Gopal S Akshintala <gopala.akshintala@salesforce.com>
1 parent 7846b92 commit 437e956

File tree

3 files changed

+311
-342
lines changed

3 files changed

+311
-342
lines changed

.github/workflows/gatsby.yml

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,19 @@
1-
# Sample workflow for building and deploying a Gatsby site to GitHub Pages
2-
#
3-
# To get started with Gatsby see: https://www.gatsbyjs.com/docs/quick-start/
4-
#
5-
name: Gatsby site Deploy to Pages
6-
1+
name: Gatsby Publish to Github Pages
72
on:
8-
# Runs on pushes targeting the default branch
93
push:
104
branches: ["source-v2"]
11-
12-
# Allows you to run this workflow manually from the Actions tab
135
workflow_dispatch:
14-
15-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
166
permissions:
177
contents: read
188
pages: write
199
id-token: write
20-
21-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2310
concurrency:
2411
group: "pages"
2512
cancel-in-progress: false
26-
27-
# Default to bash
2813
defaults:
2914
run:
3015
shell: bash
31-
3216
jobs:
33-
# Build job
3417
build:
3518
runs-on: ubuntu-latest
3619
steps:
@@ -54,25 +37,8 @@ jobs:
5437
key: ${{ runner.os }}-gatsby-build-${{ hashFiles('public') }}
5538
restore-keys: |
5639
${{ runner.os }}-gatsby-build-
57-
- name: Install dependencies
58-
run: yarn install
59-
- name: Build with Gatsby
60-
env:
61-
GATSBY_CPU_COUNT: 1
62-
run: yarn build
63-
- name: Upload GitHub Pages artifact
64-
uses: actions/upload-pages-artifact@v3.0.1
40+
- name: Gatsby Publish
41+
uses: enriikke/gatsby-gh-pages-action@v2.2.1
6542
with:
66-
path: ./public
43+
access-token: ${{ secrets.ACCESS_TOKEN }}
6744

68-
# Deployment job
69-
deploy:
70-
environment:
71-
name: github-pages
72-
url: ${{ steps.deployment.outputs.page_url }}
73-
runs-on: ubuntu-latest
74-
needs: build
75-
steps:
76-
- name: Deploy to GitHub Pages
77-
id: deployment
78-
uses: actions/deploy-pages@v4.0.4

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
"author": "Gopal S Akshintala <gopalakshintala@gmail.com>",
2020
"license": "MIT",
2121
"dependencies": {
22-
"@mdx-js/react": "^3.0.0",
22+
"@mdx-js/react": "^3.0.1",
2323
"bluebird": "^3.7.2",
2424
"eslint-plugin-react-hooks": "^4.6.0",
25-
"firebase": "^10.7.2",
25+
"firebase": "^10.8.0",
2626
"gatsby": "^5.13.3",
2727
"gatsby-plugin-catch-links": "^5.13.1",
2828
"gatsby-plugin-cname": "^1.0.0",
@@ -54,12 +54,12 @@
5454
"katex": "^0.16.9",
5555
"lodash": "^4.17.21",
5656
"lru-cache": "^10.2.0",
57-
"metascraper-description": "^5.43.4",
58-
"metascraper-image": "^5.43.4",
59-
"metascraper-title": "^5.43.4",
60-
"metascraper-url": "^5.43.4",
57+
"metascraper-description": "^5.44.0",
58+
"metascraper-image": "^5.44.0",
59+
"metascraper-title": "^5.44.0",
60+
"metascraper-url": "^5.44.0",
6161
"moment": "^2.30.1",
62-
"postcss": "^8.4.33",
62+
"postcss": "^8.4.35",
6363
"prismjs": "^1.29.0",
6464
"prop-types": "^15.8.1",
6565
"react": "^18.2.0",
@@ -73,7 +73,7 @@
7373
},
7474
"devDependencies": {
7575
"@babel/core": "^7.23.9",
76-
"@babel/eslint-parser": "^7.23.9",
76+
"@babel/eslint-parser": "^7.23.10",
7777
"@babel/eslint-plugin": "^7.23.5",
7878
"@babel/plugin-syntax-flow": "^7.23.3",
7979
"@babel/plugin-transform-flow-strip-types": "^7.23.3",
@@ -91,11 +91,11 @@
9191
"eslint-plugin-jsx-a11y": "^6.8.0",
9292
"eslint-plugin-prettier": "^5.1.3",
9393
"eslint-plugin-react": "^7.33.2",
94-
"eslint-plugin-simple-import-sort": "^10.0.0",
94+
"eslint-plugin-simple-import-sort": "^12.0.0",
9595
"gh-pages": "^6.1.1",
9696
"lost": "^9.0.2",
9797
"postcss-pxtorem": "^6.1.0",
98-
"prettier": "^3.2.4"
98+
"prettier": "^3.2.5"
9999
},
100100
"resolutions": {
101101
"gatsby-plugin-sharp/probe-image-size": "^7.0.0"

0 commit comments

Comments
 (0)