Upgrade to latest #5
Workflow file for this run
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 staging | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
environment: staging | |
runs-on: ubuntu-latest | |
env: | |
NODE_ENV: ${{ vars.NODE_ENV }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: ${{ secrets.HUGO_VERSION }} | |
extended: true | |
env: | |
HUGO_GOOGLEANALYTICS: ${{ secrets.HUGO_GOOGLE }} | |
HUGOxPARAMSxALGOLIA_APPID: ${{ secrets.HUGOXPARAMSXALGOLIA_APPID }} | |
HUGOxPARAMSxALGOLIA_APIKEY: ${{ secrets.ALGOLIA_SEARCH_API_KEY }} | |
HUGOxPARAMSxALGOLIA_INDEXNAME: ${{ secrets.HUGOXPARAMSXALGOLIA_INDEXNAME }} | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ vars.RUBY_VERSION }} | |
- run: gem install asciidoctor asciidoctor-html5s asciidoctor-rouge | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ vars.NODE_VERSION }} | |
- run: npm install | |
- name: Run Hugo | |
run: | | |
hugo ${{ vars.HUGO_ARGS }} | |
cd scripts/ | |
./sw.sh | |
- name: Upload Hugo Algolia Index | |
uses: aoudiamoncef/hugo-algolia-uploader@main | |
with: | |
app_id: ${{ secrets.HUGOXPARAMSXALGOLIA_APPID }} | |
admin_key: ${{ secrets.HUGOXPARAMSXALGOLIA_APIKEY }} | |
index_name: ${{ secrets.HUGOXPARAMSXALGOLIA_INDEXNAME }} | |
index_languages: en,fr |