feat: eduraom images #10
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 mdBook site via ssh | |
| on: | |
| push: | |
| branches: ["main"] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| MDBOOK_VERSION: 0.4.51 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install mdBook | |
| run: | | |
| curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh | |
| rustup update | |
| cargo install --version ${MDBOOK_VERSION} mdbook | |
| - name: Build with mdBook | |
| run: mdbook build | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: book | |
| path: book/ | |
| # Deployment job | |
| # https://zellwk.com/blog/github-actions-deploy/ | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: book | |
| path: book/ | |
| - name: Install SSH Key | |
| uses: shimataro/ssh-key-action@v2 | |
| with: | |
| key: ${{ secrets.DEPLOY_SSH_KEY }} | |
| known_hosts: ${{ secrets.DEPLOY_SSH_KNOWN_HOSTS }} | |
| - name: Deploy with rsync | |
| run: rsync -avh --delete ./book/ ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOSTNAME }}:/var/www/docs.alias-asso.fr/ | |