Skip to content

Github Pages

Github Pages #6

Workflow file for this run

---
name: Github Pages
on: workflow_dispatch
permissions: {}
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
actions: read
contents: write
steps:
- uses: actions/checkout@v4
- name: Use Setup Node and Install Dependencies Action
uses: commerce-docs/devsite-install-action@main
with:
node-version-file: '.nvmrc'
cache-dependency-path: 'yarn.lock'
- name: Build site
run: yarn build
env:
NODE_OPTIONS: "--max-old-space-size=8192"
PREFIX_PATHS: true # works like --prefix-paths flag for 'gatsby build'
PATH_PREFIX: ${{ github.event.repository.name }}
ADOBE_LAUNCH_SRC: ${{ secrets.AIO_ADOBE_LAUNCH_SRC }}
ADOBE_LAUNCH_SRC_INCLUDE_IN_DEVELOPMENT: ${{ secrets.ADOBE_LAUNCH_SRC_INCLUDE_IN_DEVELOPMENT }}
REPO_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_OWNER: ${{ github.event.repository.owner.login }}
REPO_NAME: ${{ github.event.repository.name }}
REPO_BRANCH: ${{ github.ref_name }}
GOOGLE_OAUTH_CLIENT_ID: ${{ secrets.GOOGLE_OAUTH_CLIENT_ID }}
GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.GOOGLE_OAUTH_CLIENT_SECRET }}
GOOGLE_DOCS_TOKEN: ${{ secrets.GOOGLE_DOCS_TOKEN }}
GOOGLE_DOCS_FOLDER_ID: ${{ secrets.GOOGLE_DOCS_FOLDER_ID }}
- name: Deploy to GH Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: public # The folder the action should deploy.
clean: true # Automatically remove deleted files from deploy branch
- name: GH Pages URL
id: gh-pages-url
run: |
echo "View GH-Pages: $(https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }})"