Skip to content

Commit

Permalink
chore: modif github actions pour publish sous /slides sur les tags
Browse files Browse the repository at this point in the history
  • Loading branch information
dlucasd committed Jun 23, 2024
1 parent 5e87ea0 commit eb20da7
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ jobs:
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: slides/build # The folder the action should deploy.
branch: gh-pages
branch: gh-pages
clean: false
53 changes: 53 additions & 0 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build and deploy tag release

on:
push:
tags:
- '*'

permissions:
contents: write

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Checkout reveal.js 🛎️
uses: actions/checkout@v3
with:
repository: hakimel/reveal.js
ref: 4.2.0
path: reveal.js

- name: Build reveal.js 🛎️
run: npm ci && rm -rf node_modules\
working-directory: reveal.js

- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
uses: addnab/docker-run-action@v3
with:
image: asciidoctor/docker-asciidoctor:1.65
options: -v ${{ github.workspace }}:/documents
run: |
asciidoctor-revealjs /documents/index.adoc
- name: Copy build to folder 📦
run: |
mkdir -p build/${{ github.ref_name }}/reveal.js/dist && \
cp -r *.html images css fonts project build/${{ github.ref_name }} && \
cp -r reveal.js/dist/* build/${{ github.ref_name }}/reveal.js/dist/ && \
cp -r reveal.js/plugin build/${{ github.ref_name }}/reveal.js/
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
folder: build
branch: gh-pages
clean: false

0 comments on commit eb20da7

Please sign in to comment.