Merge pull request #321 from ake123/master #556
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: github pages | |
| on: | |
| push: | |
| branches: | |
| - master # Set a branch to deploy | |
| pull_request: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true # Fetch Hugo themes (true OR recursive) | |
| fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: '0.143.1' | |
| # extended: true | |
| - name: Build | |
| run: hugo --minify | |
| - name: Checkout Husna output | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 0xMuluh/fopp-husna | |
| token: ${{ secrets.PRIVATE_REPO_TOKEN }} | |
| path: _collab/husna | |
| sparse-checkout: | | |
| output | |
| lfs: true | |
| - name: Checkout Lotta output | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 0xMuluh/fopp-lotta | |
| token: ${{ secrets.PRIVATE_REPO_TOKEN }} | |
| path: _collab/lotta | |
| sparse-checkout: | | |
| output | |
| lfs: true | |
| - name: Copy collab sites | |
| run: | | |
| mkdir -p public/collab/kirsi/husna public/collab/kirsi/lotta | |
| rsync -a --delete _collab/husna/output/ public/collab/kirsi/husna/ | |
| rsync -a --delete _collab/lotta/output/ public/collab/kirsi/lotta/ | |
| printf '%s\n' \ | |
| 'AuthType Basic' \ | |
| 'AuthName "Husna Collaboration"' \ | |
| 'AuthUserFile /home/hoster/.htpasswd-husna' \ | |
| 'Require valid-user' \ | |
| > public/collab/kirsi/husna/.htaccess | |
| printf '%s\n' \ | |
| 'AuthType Basic' \ | |
| 'AuthName "Lotta Collaboration"' \ | |
| 'AuthUserFile /home/hoster/.htpasswd-lotta' \ | |
| 'Require valid-user' \ | |
| > public/collab/kirsi/lotta/.htaccess | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v4 | |
| if: github.ref == 'refs/heads/master' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./public |