Deploy #1552
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: | |
| - gh-pages | |
| schedule: | |
| - cron: '57 14 * * *' | |
| jobs: | |
| deploy: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| environment: toot | |
| steps: | |
| - name: Setup | Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup | Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Build | |
| run: ./build.sh | |
| - name: Toot | |
| env: | |
| MASTO_ACCESS_TOKEN: ${{ secrets.MASTO_ACCESS_TOKEN }} | |
| MASTO_URL: ${{ secrets.MASTO_URL }} | |
| MASTO_CLIENT_ID: ${{ secrets.MASTO_CLIENT_ID }} | |
| MASTO_CLIENT_SECRET: ${{ secrets.MASTO_CLIENT_SECRET }} | |
| run: | | |
| cd toot | |
| pip install -r requirements.txt | |
| ./toot.py | |
| - name: Deploy | |
| run: | | |
| git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
| git config --global user.name "${GITHUB_ACTOR}" | |
| git add index.html stable beta nightly | |
| git add toot/stable toot/beta | |
| if git commit -m "Deploy nightly"; then | |
| echo "File regenerated. Need to push branch." | |
| git push origin gh-pages | |
| fi |