Skip to content

Commit

Permalink
revising publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
philipbaileynar committed Feb 2, 2024
1 parent 37b8081 commit a6e177c
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,10 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ./.nvmrc
cache-dependency-path: ./package.json
node-version-file: ./docs/.nvmrc
cache-dependency-path: ./docs/package.json
cache: yarn

- name: Get correct version of Yarn
run: corepack enable; yarn set version berry

- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
Expand All @@ -48,31 +45,30 @@ jobs:
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: gatsby


- name: Restore cache
uses: actions/cache@v3
with:
path: |
./public
./.cache
./docs/public
./docs/.cache
key: ${{ runner.os }}-gatsby-build-${{ hashFiles('public') }}
restore-keys: |
${{ runner.os }}-gatsby-build-
- name: Install dependencies
working-directory: .
working-directory: ./docs
run: yarn install

- name: Build with Gatsby
working-directory: .
working-directory: ./docs
env:
PREFIX_PATHS: 'true'
run: yarn run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public
path: ./docs/public

# Deployment job
deploy:
Expand All @@ -84,4 +80,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v2

0 comments on commit a6e177c

Please sign in to comment.