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 fbd9849
Showing 1 changed file with 28 additions and 10 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

0 comments on commit fbd9849

Please sign in to comment.