Skip to content

Commit

Permalink
chore: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
debuggingfuture committed May 10, 2024
1 parent 92b69a9 commit d53c31e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 11 deletions.
38 changes: 28 additions & 10 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,25 @@ on:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false


jobs:
deployment:
name: Deploy to GitHub Page
build:
name: Build Page
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "20"
- uses: pnpm/action-setup@v4
with:
version: 8
Expand All @@ -22,10 +32,18 @@ jobs:
run: pnpm install
- name: Export
run: pnpm export

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
commit_message: ${{ github.event.head_commit.message }}
path: ./out

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"export": "next build && next-sitemap && next export",
"export": "NODE_OPTIONS=--openssl-legacy-providernext build && next-sitemap && next export",
"lint": "eslint .",
"test": "jest .",
"storybook": "start-storybook -p 6006 -s ./public",
Expand Down

0 comments on commit d53c31e

Please sign in to comment.