Skip to content

Commit

Permalink
chore: 🤖 deploy gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi1520 committed Mar 31, 2024
1 parent 9a9aa69 commit 1d6bf1f
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

jobs:
deploy:
build:
runs-on: ubuntu-20.04
permissions:
contents: write
Expand Down Expand Up @@ -35,26 +35,29 @@ jobs:
- run: yarn install
- run: yarn build
- run: npx next export
- name: deploy
uses: maqi1520/action-qiniu-upload@master
- name: Setup Pages
uses: actions/configure-pages@v4
with:
# Your qiniu access key, required.
access_key: ${{ secrets.QINIU_ACCESS_KEY }}

# Your qiniu secret key, required.
secret_key: ${{ secrets.QINIU_SECRET_KEY }}
static_site_generator: out

# Bucket name, required.
bucket: ${{ secrets.QINIU_BUCKET }}
# Deploy job
deploy:
# Add a dependency to the build job
needs: build

# The local directory (or file) you want to upload to bucket.
# Default: './'
source_dir: 'out'
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# The directory inside of the bucket you want to upload to, namely key prefix prepended to dest file key.
# Default: '/'
dest_dir: '/'
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

# Whether to ignore source maps.
# Default: true
ignore_source_map: true
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action

0 comments on commit 1d6bf1f

Please sign in to comment.