Skip to content

[Communication::Website::Configs::DefaultContentSecurityPolicy] Save … #6801

[Communication::Website::Configs::DefaultContentSecurityPolicy] Save …

[Communication::Website::Configs::DefaultContentSecurityPolicy] Save … #6801

Workflow file for this run

name: ubordeauxmontaigne
on:
push:
branches:
- main # Set a branch to deploy
jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
steps:
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 1 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: ${{ secrets.HUGO_VERSION }}
extended: true
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'yarn'
- name: Install JS dependencies
run: yarn install
- name: Build
run: yarn osuny build
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: 'just-a-placeholder-so-we-dont-get-errors'
- name: Adding Known Hosts
run: ssh-keyscan -p ${{ secrets.SSH_PORT }} -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Deploy with rsync
run: rsync -avz --delete -e "ssh -p ${{ secrets.SSH_PORT }}" ./public/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.SSH_WORKDIR }}/
- name: Notification Slack en cas d'échec
uses: ravsamhq/[email protected]
if: always()
with:
status: ${{ job.status }}
notify_when: "failure"
notification_title: ""
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}