Example Push Action #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Example Push Action | |
on: | |
push: | |
branches: | |
- "master" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v4 | |
- run: npm install | |
- run: npm run build | |
- run: | | |
cp -r .git dist/ | |
cd dist | |
git checkout --orphan build-ssg | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit -m "Build" | |
git push -f origin build-ssg |