diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index aabab56..9261225 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,7 +7,7 @@ on: pull_request: jobs: - deploy: + build: runs-on: ubuntu-20.04 permissions: contents: write @@ -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