mirror of
https://github.com/one-among-us/data.git
synced 2024-11-10 13:24:50 +08:00
[O] Optimize deploy to pages action
This commit is contained in:
parent
3a72378914
commit
20578afea5
23
.github/workflows/generator.yml
vendored
23
.github/workflows/generator.yml
vendored
@ -10,6 +10,12 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -38,15 +44,8 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: yarn build
|
run: yarn build
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy to github pages
|
||||||
run: |
|
uses: JamesIves/github-pages-deploy-action@4.4.1
|
||||||
git config --global user.name "$(git show -s --format='%an' HEAD)"
|
with:
|
||||||
git config --global user.email "$(git show -s --format='%ae' HEAD)"
|
branch: gh-pages
|
||||||
|
folder: dist
|
||||||
cd dist
|
|
||||||
git init
|
|
||||||
git add .
|
|
||||||
git commit -m "Build on $(date '+%Y-%m-%d %H:%M:%S')"
|
|
||||||
git branch -m gh-pages
|
|
||||||
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
|
|
||||||
git push -f origin gh-pages
|
|
||||||
|
Loading…
Reference in New Issue
Block a user