Create dependabot.yml #105
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: Deploy to GitHub Pages | |
on: | |
push: | |
# Update branch according from where you will be pushing the code | |
# Small change to rebuild | |
branches: [ main ] | |
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 --dart-define="MODE=production" | |
# Web deploy now is contained in build/web directory | |
- run: | | |
cd build | |
mkdir web-deploy | |
cd web-deploy | |
#! Update with your Email ID associated with GitHub | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
#! Update with your username associated with GitHub | |
git config --global user.name 'github-actions[bot]' | |
git config --global init.defaultBranch main | |
git init | |
# the repository to push the deploy into | |
#! Update the following with your username and repository | |
git remote add origin https://${{secrets.ACCESS_TOKEN}}@github.com/Steelhacks-2023/Lost-At-Pitt.git | |
git fetch origin gh-pages | |
git switch gh-pages | |
# copy the build that is there in ROOT/build/web into ROOT/build/web-deploy | |
cp -R ../web/* . | |
git status | |
git add . | |
# add commit of the previous commit from main | |
echo "" | |
echo "Committing to gh-pages: ${{ github.event.head_commit.message }}" | |
echo "" | |
git commit -m "${{ github.event.head_commit.message }}" | |
git push origin gh-pages |