Merge pull request #3 from erseco/add-examples #29
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: Build & Publish to GitHub Pages | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: GitHub Checkout | |
uses: actions/checkout@v3 | |
- name: Add js version to avoid cache | |
run: | | |
TIMESTAMP=$(date +%s) | |
VERSION="?v=$TIMESTAMP" | |
sed -i "s|script.js|script.js$VERSION|g" index.html | |
sed -i "s|style.css|style.css$VERSION|g" index.html | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
allow_empty_commit: true | |
publish_dir: . | |
cname: elidd.ernesto.es | |
enable_jekyll: false |