Skip to content

Update web-deploy.yml #6

Update web-deploy.yml

Update web-deploy.yml #6

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [ main ]
defaults:
run:
working-directory: ./dnd_spell_saver
jobs:
build:
runs-on: ubuntu-latest
env:
my_secret: ${{secrets.ACCESS_TOKEN}}
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter clean
- run: flutter pub get
- run: flutter build web --release --base-href=/deployment/
- run: |
cd build
mkdir web-deploy
cd web-deploy
git config --global user.email [email protected]
git config --global user.name rovati
git config --global init.defaultBranch main
git init
git remote add origin https://${{secrets.ACCESS_TOKEN}}@github.com/rovati/dnd-spell-saver.git
git fetch origin deployment
git switch deployment
cp -R ../web/* .
git status
git add .
echo ""
echo "Committing to deployment: ${{ github.event.head_commit.message }}"
echo ""
git commit -m "${{ github.event.head_commit.message }}"
git push origin deployment