mirror of https://gitlab.com/curben/blog
ci(ga): use native actions to deploy Pages
This commit is contained in:
parent
81fac2ef57
commit
428a10d631
|
@ -6,7 +6,7 @@ on:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pages:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -25,9 +25,20 @@ jobs:
|
||||||
run: npm install --include=optional --force
|
run: npm install --include=optional --force
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build
|
run: npm run build
|
||||||
- name: Deploy
|
- name: Upload Pages artifact
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
path: ./public
|
||||||
publish_dir: ./public
|
deploy:
|
||||||
force_orphan: true
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
permissions:
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
||||||
|
|
Loading…
Reference in New Issue