Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tsengyushiang authored Sep 14, 2024
1 parent 998dae1 commit ce39ca1
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: DeployGihubPage

on:
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

permissions:
contents: write

steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: |
yarn install
yarn build
touch ./dist/.nojekyll
git config --global user.email "github@example.com"
git config --global user.name "git workflows"
git add dist/ -f
git commit -m "Deploy gh-pages"
#git subtree push --prefix dist origin gh-pages
git subtree split --prefix dist -b gh-pages
git push -f origin gh-pages:gh-pages
git branch -D gh-pages

0 comments on commit ce39ca1

Please sign in to comment.