2020-12-23 03:26:23 -05:00
|
|
|
on: [push, pull_request]
|
|
|
|
name: Test
|
2022-05-03 03:23:47 -04:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2020-12-23 03:26:23 -05:00
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
env:
|
|
|
|
GOPROXY: https://proxy.golang.org
|
|
|
|
GO111MODULE: on
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-03-16 03:57:58 -04:00
|
|
|
# Note: We upgraded to Go 1.18 in Hugo v0.95.0
|
|
|
|
# Go 1.18 had some breaking changes on the source level which means Hugo cannot be built
|
2022-03-21 12:25:36 -04:00
|
|
|
# with older Go versions, but the improvements in Go 1.18 were too good to pass on (e.g. break and continue).
|
2022-03-16 03:57:58 -04:00
|
|
|
# Note that you don't need Go (or Go 1.18) to run a pre-built binary.
|
2022-08-03 06:27:03 -04:00
|
|
|
go-version: [1.18.x,1.19.x]
|
2020-12-23 03:26:23 -05:00
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
|
|
- name: Install Go
|
|
|
|
uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Install Ruby
|
|
|
|
uses: actions/setup-ruby@5f29a1cd8dfebf420691c4c9a0e832e2fae5a526
|
|
|
|
with:
|
|
|
|
ruby-version: '2.7'
|
|
|
|
- name: Install Python
|
|
|
|
uses: actions/setup-python@3105fb18c05ddd93efea5f9e0bef7a03a6e9e7df
|
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
|
|
|
- name: Install Mage
|
2022-03-16 05:41:08 -04:00
|
|
|
run: go install github.com/magefile/mage@07afc7d24f4d6d6442305d49552f04fbda5ccb3e
|
2020-12-23 03:26:23 -05:00
|
|
|
- name: Install asciidoctor
|
|
|
|
uses: reitzig/actions-asciidoctor@7570212ae20b63653481675fb1ff62d1073632b0
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
|
|
|
- name: Install docutils
|
|
|
|
run: |
|
|
|
|
pip install docutils
|
|
|
|
rst2html.py --version
|
|
|
|
- if: matrix.os == 'ubuntu-latest'
|
|
|
|
name: Install pandoc on Linux
|
|
|
|
run: |
|
|
|
|
sudo apt-get update -y
|
|
|
|
sudo apt-get install -y pandoc
|
|
|
|
- if: matrix.os == 'macos-latest'
|
|
|
|
run: |
|
|
|
|
brew install pandoc
|
|
|
|
- if: matrix.os == 'windows-latest'
|
|
|
|
run: |
|
2022-08-14 02:52:23 -04:00
|
|
|
Choco-Install -PackageName pandoc
|
2020-12-23 03:26:23 -05:00
|
|
|
- run: pandoc -v
|
2022-08-14 02:52:23 -04:00
|
|
|
- if: matrix.os == 'windows-latest'
|
|
|
|
run: |
|
|
|
|
Choco-Install -PackageName mingw -ArgumentList "--version","10.2.0","--allow-downgrade"
|
2020-12-23 03:26:23 -05:00
|
|
|
- if: matrix.os == 'ubuntu-latest'
|
|
|
|
name: Install dart-sass-embedded Linux
|
|
|
|
run: |
|
2021-02-06 11:51:08 -05:00
|
|
|
curl -LJO https://github.com/sass/dart-sass-embedded/releases/download/1.0.0-beta.6/sass_embedded-1.0.0-beta.6-linux-x64.tar.gz;
|
|
|
|
echo "04fc1e5e28d29a4585a701941b6dace56771d94bfbe7f9e4db28d24417ceeec3 sass_embedded-1.0.0-beta.6-linux-x64.tar.gz" | sha256sum -c;
|
|
|
|
tar -xvf sass_embedded-1.0.0-beta.6-linux-x64.tar.gz;
|
2020-12-23 03:26:23 -05:00
|
|
|
echo "$GITHUB_WORKSPACE/sass_embedded/" >> $GITHUB_PATH
|
|
|
|
- if: matrix.os == 'macos-latest'
|
|
|
|
name: Install dart-sass-embedded MacOS
|
|
|
|
run: |
|
2021-02-06 11:51:08 -05:00
|
|
|
curl -LJO https://github.com/sass/dart-sass-embedded/releases/download/1.0.0-beta.6/sass_embedded-1.0.0-beta.6-macos-x64.tar.gz;
|
|
|
|
echo "b3b984675a9b04aa22f6f2302dda4191b507ac2ca124467db2dfe7e58e72fbad sass_embedded-1.0.0-beta.6-macos-x64.tar.gz" | shasum -a 256 -c;
|
|
|
|
tar -xvf sass_embedded-1.0.0-beta.6-macos-x64.tar.gz;
|
2020-12-23 03:26:23 -05:00
|
|
|
echo "$GITHUB_WORKSPACE/sass_embedded/" >> $GITHUB_PATH
|
|
|
|
- if: matrix.os == 'windows-latest'
|
|
|
|
name: Install dart-sass-embedded Windows
|
|
|
|
run: |
|
2021-02-06 11:51:08 -05:00
|
|
|
curl -LJO https://github.com/sass/dart-sass-embedded/releases/download/1.0.0-beta.6/sass_embedded-1.0.0-beta.6-windows-x64.zip;
|
|
|
|
echo "6ae442129dbb3334bc21ef851261da6c0c1b560da790ca2e1350871d00ab816d sass_embedded-1.0.0-beta.6-windows-x64.zip" | sha256sum -c;
|
|
|
|
unzip sass_embedded-1.0.0-beta.6-windows-x64.zip;
|
2020-12-23 03:26:23 -05:00
|
|
|
echo "$env:GITHUB_WORKSPACE/sass_embedded/" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf-8 -Append
|
2022-05-27 04:06:45 -04:00
|
|
|
- name: Check
|
2020-12-23 03:26:23 -05:00
|
|
|
run: |
|
|
|
|
mage -v check;
|
2022-05-27 04:06:45 -04:00
|
|
|
env:
|
|
|
|
HUGO_BUILD_TAGS: extended
|
2020-12-23 03:26:23 -05:00
|
|
|
- name: Build Docs
|
|
|
|
env:
|
|
|
|
HUGO_BUILD_TAGS: extended
|
|
|
|
HUGO_TIMEOUT: 31000
|
|
|
|
HUGO_IGNOREERRORS: error-remote-getjson
|
2021-06-13 05:09:50 -04:00
|
|
|
HUGO_SERVICES_INSTAGRAM_ACCESSTOKEN: dummytoken
|
2020-12-23 03:26:23 -05:00
|
|
|
run: |
|
|
|
|
mage -v hugo
|
|
|
|
./hugo -s docs/
|
|
|
|
./hugo --renderToMemory -s docs/
|