Build pages #49
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: Build pages | |
| on: | |
| push: | |
| branches: [master] | |
| schedule: | |
| - cron: '0 0 */7 * *' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python 3.9 | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.9 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # Current scraper without encryption (active) | |
| - name: Run scraper (no encryption) | |
| run: python scrape_switchbrew.py | |
| # Original script with encryption (disabled) | |
| # Uncomment the following lines to use the original encrypted version | |
| # Note: Requires KEYS_PROD secret to be set in repository secrets | |
| # - name: Install encryption dependencies | |
| # run: pip install -r requirements.txt | |
| # - name: Run original script (with encryption) | |
| # run: python update.py | |
| # env: | |
| # KEYS_PROD: ${{ secrets.KEYS_PROD }} | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v3.6.1 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: public | |
| force_orphan: true | |
| user_name: Producdevity | |
| user_email: y.gherbi.dev@gmail.com |