mirror of
https://github.com/shadoll/sLogos.git
synced 2026-02-04 02:53:22 +00:00
refactor: Update GitHub Actions workflow for improved deployment process and permissions
This commit is contained in:
22
.github/workflows/gh-pages.yml
vendored
22
.github/workflows/gh-pages.yml
vendored
@@ -5,6 +5,9 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -29,9 +32,18 @@ jobs:
|
|||||||
cp public/CNAME public/build/CNAME
|
cp public/CNAME public/build/CNAME
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages
|
- name: Upload artifact
|
||||||
uses: peaceiris/actions-gh-pages@v4
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
path: ./public/build
|
||||||
publish_dir: ./public/build
|
|
||||||
publish_branch: gh-pages
|
deploy:
|
||||||
|
needs: build-and-deploy
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user