Skip to content

Commit c01c643

Browse files
committed
gh action fix
1 parent 81478c4 commit c01c643

File tree

1 file changed

+29
-44
lines changed

1 file changed

+29
-44
lines changed

.github/workflows/deploy.yml

Lines changed: 29 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,40 @@
1-
# Simple workflow for deploying static content to GitHub Pages
2-
name: Deploy static content to Pages
1+
name: Deploy to GitHub Pages
32

43
on:
5-
# Runs on pushes targeting the default branch
64
push:
7-
branches: [main]
8-
9-
# Allows you to run this workflow manually from the Actions tab
10-
workflow_dispatch:
11-
12-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13-
permissions:
14-
contents: read
15-
pages: write
16-
id-token: write
17-
18-
# Allow one concurrent deployment
19-
concurrency:
20-
group: "pages"
21-
cancel-in-progress: true
22-
23-
env:
24-
# Hosted GitHub runners have 7 GB of memory available, let's use 6 GB
25-
NODE_OPTIONS: --max-old-space-size=6144
5+
branches:
6+
- main
7+
# Review gh actions docs if you want to further define triggers, paths, etc
8+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
269

2710
jobs:
28-
# Single deploy job since we're just deploying
2911
deploy:
30-
environment:
31-
name: github-pages
32-
url: ${{ steps.deployment.outputs.page_url }}
12+
name: Deploy to GitHub Pages
3313
runs-on: ubuntu-latest
3414
steps:
35-
- name: Checkout
36-
uses: actions/checkout@v3
37-
- name: Set up Node.js
38-
uses: actions/setup-node@v3
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
3917
with:
40-
node-version: 16.x
41-
cache: yarn
18+
node-version: 18
19+
cache: npm
20+
4221
- name: Install dependencies
43-
run: yarn install --frozen-lockfile --non-interactive
44-
- name: Build
45-
run: yarn build
46-
- name: Setup Pages
47-
uses: actions/configure-pages@v1
48-
- name: Upload artifact
49-
uses: actions/upload-pages-artifact@v1
50-
with:
51-
# Upload entire repository
52-
path: build
22+
run: npm ci
23+
- name: Build website
24+
run: npm run build
25+
26+
# Popular action to deploy to GitHub Pages:
27+
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
5328
- name: Deploy to GitHub Pages
54-
id: deployment
55-
uses: actions/deploy-pages@v1
29+
uses: peaceiris/actions-gh-pages@v3
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
# Build output to publish to the `gh-pages` branch:
33+
publish_dir: ./build
34+
# The following lines assign commit authorship to the official
35+
# GH-Actions bot for deploys to `gh-pages` branch:
36+
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
37+
# The GH actions bot is used by default if you didn't specify the two fields.
38+
# You can swap them out with your own user credentials.
39+
user_name: github-actions[bot]
40+
user_email: 41898282+github-actions[bot]@users.noreply.github.com

0 commit comments

Comments
 (0)