Prepare release v0.11.0 (#216) #575
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: Publish | |
env: | |
HUGO_VERSION: mojo-lexer # 0.140.2 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
publish: | |
name: Generate and publish docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Modo | |
uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.23.x' | |
- name: Install dependencies | |
run: go get . | |
- name: Install magic CLI | |
run: | | |
curl -ssL https://magic.modular.com | bash | |
source /home/runner/.bash_profile | |
- name: Install mojo and dependencies | |
run: | | |
source /home/runner/.bash_profile | |
cd docs | |
magic install --locked | |
- name: Clone Hugo | |
run: | | |
git clone https://github.com/mlange-42/hugo.git | |
cd hugo | |
git checkout ${{env.HUGO_VERSION}} | |
- name: Install Hugo | |
run: | | |
cd hugo | |
go install . | |
#- name: Setup Hugo | |
# uses: peaceiris/actions-hugo@v3 | |
# with: | |
# hugo-version: '${{env.HUGO_VERSION}}' | |
# extended: true | |
- name: Run Modo # includes `mojo doc` and `mojo test` | |
run: | | |
source /home/runner/.bash_profile | |
go run . build docs | |
- name: Run Hugo | |
run: | | |
hugo -s docs/docs/site | |
- name: Install reveal-md | |
run: | | |
npm install --global reveal-md | |
- name: Build slides | |
run: | | |
cd docs/docs/slides | |
reveal-md slides.md --static ../site/public/slides --static-dirs=.nojekyll,img | |
- name: Archive Markdown artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: markdown | |
path: docs/docs/site/content | |
- name: Archive HTML artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: public | |
path: docs/docs/site/public | |
- name: Deploy to GitHub Pages | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
uses: crazy-max/ghaction-github-pages@v4 | |
with: | |
target_branch: gh-pages | |
build_dir: docs/docs/site/public | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |