content/fr/blog/posts/definition-ospo/definition-ospo.md: Fix link #63
This file contains 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 code.gouv.fr website to preproduction | |
on: | |
push: | |
branches: ["main"] | |
jobs: | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build with Eleventy | |
run: | | |
npm install | |
npm run build-preproduction | |
- name: Index site for pagefind | |
run: npm run postbuild | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: site | |
path: _site/ | |
# Deployment job | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: site | |
path: _site/ | |
- name: Deploy to Server | |
uses: easingthemes/ssh-deploy@main | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} # must be in PEM format | |
ARGS: "-av --delete" | |
SOURCE: _site/ | |
REMOTE_HOST: ${{ secrets.REMOTE_HOST }} | |
REMOTE_USER: ${{ secrets.REMOTE_USER }} | |
TARGET: ${{ secrets.REMOTE_TARGET }} |