Skip to content

Commit

Permalink
feat: add deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
ljc1991 committed Oct 9, 2023
1 parent 2ab2239 commit b1ffeba
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
node-version: '18.x'
- run: npm install
- run: npm run build
test:
test:
needs: build
runs-on: ubuntu-latest
steps:
steps:
- name: checkout repo
uses: actions/checkout@v3
- name: use node.js
Expand All @@ -24,3 +24,38 @@ jobs:
node-version: '18.x'
- run: npm install
- run: npm test
deploy:
needs: test
permissions:
deployments: write
contents: write
statuses: write
actions: write
pages: write
id-token: write
environment:
name: production
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: use node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- run: npm install
- run: npm run build
- name: configure github pages
uses: actions/configure-pages@v3
with:
static_site_generator: next
- name: upload artifacts
uses: actions/upload-pages-artifact@v1
with:
path: './out'
- name: deploy
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit b1ffeba

Please sign in to comment.