Skip to content

Commit b9b9732

Browse files
committed
Update GitHub Pages workflow
1 parent 8b3d074 commit b9b9732

File tree

1 file changed

+18
-43
lines changed

1 file changed

+18
-43
lines changed

.github/workflows/github-pages.yml

+18-43
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,20 @@
1-
---
2-
name: Github Pages
1+
name: Deploy Gatsby site to Pages
2+
33
on: workflow_dispatch
4-
permissions: {}
5-
jobs:
6-
build-and-deploy:
7-
runs-on: ubuntu-latest
8-
permissions:
9-
actions: read
10-
contents: write
11-
steps:
12-
- uses: actions/checkout@v4
13-
- name: Use Setup Node and Install Dependencies Action
14-
uses: commerce-docs/devsite-install-action@main
15-
with:
16-
node-version-file: '.nvmrc'
17-
cache-dependency-path: 'yarn.lock'
184

19-
- name: Build site
20-
run: yarn build
21-
env:
22-
NODE_OPTIONS: "--max-old-space-size=8192"
23-
PREFIX_PATHS: true # works like --prefix-paths flag for 'gatsby build'
24-
PATH_PREFIX: ${{ github.event.repository.name }}
25-
ADOBE_LAUNCH_SRC: ${{ secrets.AIO_ADOBE_LAUNCH_SRC }}
26-
ADOBE_LAUNCH_SRC_INCLUDE_IN_DEVELOPMENT: ${{ secrets.ADOBE_LAUNCH_SRC_INCLUDE_IN_DEVELOPMENT }}
27-
REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28-
REPO_OWNER: ${{ github.event.repository.owner.login }}
29-
REPO_NAME: ${{ github.event.repository.name }}
30-
REPO_BRANCH: ${{ github.ref_name }}
31-
GOOGLE_OAUTH_CLIENT_ID: ${{ secrets.GOOGLE_OAUTH_CLIENT_ID }}
32-
GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.GOOGLE_OAUTH_CLIENT_SECRET }}
33-
GOOGLE_DOCS_TOKEN: ${{ secrets.GOOGLE_DOCS_TOKEN }}
34-
GOOGLE_DOCS_FOLDER_ID: ${{ secrets.GOOGLE_DOCS_FOLDER_ID }}
35-
- name: Deploy to GH Pages
36-
uses: JamesIves/github-pages-deploy-action@v4
37-
with:
38-
token: ${{ secrets.GITHUB_TOKEN }}
39-
branch: gh-pages # The branch the action should deploy to.
40-
folder: public # The folder the action should deploy.
41-
clean: true # Automatically remove deleted files from deploy branch
42-
- name: GH Pages URL
43-
id: gh-pages-url
44-
run: |
45-
echo "View GH-Pages: $(https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }})"
5+
permissions:
6+
contents: read
7+
pages: write
8+
id-token: write
9+
10+
concurrency:
11+
group: "pages"
12+
cancel-in-progress: false
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
18+
jobs:
19+
call-workflow-deploy-to-pages:
20+
uses: AdobeDocs/commerce-php/.github/workflows/deploy-to-pages_job.yml@main

0 commit comments

Comments
 (0)