Update bavarian-alps-traverse.yml (#53) #38
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 docs to GitHub Pages | |
| on: | |
| push: | |
| branches: ["devel", "main"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| env: | |
| STRAVA_CLIENT_ID: ${{ secrets.STRAVA_CLIENT_ID }} | |
| STRAVA_CLIENT_SECRET: ${{ secrets.STRAVA_CLIENT_SECRET }} | |
| STRAVA_REFRESH_TOKEN: ${{ secrets.STRAVA_REFRESH_TOKEN }} | |
| MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }} | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Restore Strava cache | |
| uses: actions/cache/restore@v3 | |
| with: | |
| path: cache/ | |
| key: strava-cache-v1 | |
| restore-keys: | | |
| strava-cache- | |
| - name: Clone private Strava cache repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: max-models/temporary-strava-activities | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| path: temp-strava-cache | |
| - name: Copy cache files | |
| run: | | |
| mkdir -p cache | |
| ls cache/ | |
| echo "-------------" | |
| cp -r temp-strava-cache/* cache/ | |
| ls cache/ | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install ".[dev,docs]" | |
| - name: Build all collections | |
| uses: ./.github/actions/build-all-collections | |
| - name: Save Strava cache | |
| if: always() | |
| uses: actions/cache/save@v3 | |
| with: | |
| path: cache/ | |
| key: strava-cache-v1 | |
| - name: Build HTML docs | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pandoc | |
| cd docs | |
| make clean | |
| make html | |
| cd .. | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload built docs | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/build/html/ | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |