Skip to content

Commit

Permalink
Ajout github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dlucasd committed Mar 18, 2024
1 parent 28e83f4 commit f930e5c
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Deploy
on: [push]
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
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: slides/reveal.js

- name: Build reveal.js🛎️
run: npm ci && rm -rf node_modules\
working-directory: slides/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/slides/index.adoc
- name: Copy build to folder 📦
run: |
mkdir -p build/reveal.js/dist && \
cp -r *.html images css build/ && \
cp -r reveal.js/dist/* build/reveal.js/dist/ && \
cp -r reveal.js/plugin build/reveal.js/
working-directory: slides

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: slides/build # The folder the action should deploy.
branch: gh-pages

0 comments on commit f930e5c

Please sign in to comment.