Sync from Osuny #85
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: deuxfleurs | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| jobs: | |
| build_and_deploy: | |
| name: Compilation du site Hugo et déploiement Deux fleurs | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: deuxfleurs | |
| cancel-in-progress: true | |
| steps: | |
| - name: Récupération des données | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - name: Installation de Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'yarn' | |
| - name: Installation des dépendances JavaScript | |
| run: yarn install | |
| - name: Installation de Hugo | |
| uses: noesya/actions-hugo@release | |
| with: | |
| hugo-version: '0.157.0' | |
| extended: true | |
| - name: Compilation du site | |
| run: yarn osuny build | |
| - name: Déploiement Garage | |
| run: npx --yes dxfl deploy demo.demo.osuny.site public/ --yes | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.DEUXFLEURS_ACCESS_KEY }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.DEUXFLEURS_SECRET }} | |
| - name: Notification Slack en cas d'échecs | |
| uses: rtCamp/action-slack-notify@v2 | |
| if: failure() | |
| env: | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| SLACK_TITLE: 'Problem on repo ${{ github.event.repository.name }}' | |
| SLACK_COLOR: '#FF0000' |