-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try a different action deploying to gh pages
- Loading branch information
1 parent
bb8e8ba
commit 3761559
Showing
1 changed file
with
31 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,43 @@ | ||
name: Gh-Pages | ||
name: GH-Pages | ||
on: | ||
push: | ||
branches: [ dev, stable ] | ||
branches: [ dev, stable, gh-pages ] | ||
pull_request: | ||
branches: [ dev, stable ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
my_secret: ${{secrets.GH_TOKEN}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: subosito/flutter-action@v1 | ||
- uses: erickzanardo/flutter-gh-pages@v3 | ||
with: | ||
workingDir: example | ||
channel: stable | ||
- run: flutter pub get | ||
- run: flutter build web | ||
- name: Archive Production Artifact | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: web-build | ||
path: build/web | ||
- name: Download Artifact | ||
uses: actions/download-artifact@master | ||
with: | ||
name: web-build | ||
- name: Display structure of build files | ||
run: ls -R | ||
working-directory: ./web | ||
- name: Deploy to GH Pages | ||
run: | | ||
cd build/web | ||
git init | ||
git config --global user.email groovinchip@gmail.com | ||
git config --global user.name GroovinChip | ||
git status | ||
git remote add origin https://${{secrets.GH_TOKEN}}@github.com/GroovinChip/macos_ui.git | ||
git checkout -b gh-pages | ||
git add --all | ||
git commit -m "update" | ||
git push origin gh-pages -f |