name: Deploy to Scaleway on: pull_request: types: [closed] branches: - main jobs: build-and-deploy: if: github.event.pull_request.merged == true runs-on: self-hosted steps: - name: Checkout code uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 - name: Setup Hugo uses: peaceiris/actions-hugo@v2 with: hugo-version: "latest" extended: true - name: Build Hugo site run: hugo --minify - name: Install Scaleway CLI run: | curl -o /usr/local/bin/scw -L "https://github.com/scaleway/scaleway-cli/releases/download/v2.32.0/scaleway-cli_2.32.0_linux_amd64" chmod +x /usr/local/bin/scw - name: Configure Scaleway CLI run: | scw init access-key=${{ secrets.SCW_ACCESS_KEY }} \ secret-key=${{ secrets.SCW_SECRET_KEY }} \ default-organization-id=${{ secrets.SCW_ORGANIZATION_ID }} \ default-region=fr-par - name: Deploy to Object Storage run: | scw object cp public/ s3://notebook-arnodo-fr/ --recursive - name: Purge CDN Cache (optional) run: | scw edge-services pipeline purge pipeline-id=${{ secrets.SCW_PIPELINE_ID }}