Skip to content

Workflow file for this run

name: Publish documentation on github pages and notify on Mattermost
on:
push:
branches:
- main
env:
DEPLOYMENT_URL: https://dataesr.github.io/dsfr-plus/
MM_NOTIFICATION_CHANNEL: bots
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true
jobs:
deploy-examples:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies and Build
run: npm ci --silent && npm run build && cd ./example-ts && npm run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload build repository
path: './example-ts/dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
notify:
needs:
- deploy-examples
if: always()
runs-on: ubuntu-latest
steps:
- uses: dataesr/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN}}
mattermost_webhook_url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
mattermost_channel: ${{ env.MM_NOTIFICATION_CHANNEL}}
deployment_url: ${{ env.DEPLOYMENT_URL }}