CI #1010
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: CI | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-18.04 | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
- name: Setup hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: "0.89.4" | |
extended: true | |
- name: Setup Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "14.10.1" | |
- name: Build Changelog | |
run: | | |
set -eu | |
sudo snap install jq | |
wget -q https://github.com/sclevine/yj/releases/download/v5.0.0/yj-linux | |
sudo mv yj-linux /usr/bin/yj | |
sudo chmod +x /usr/bin/yj | |
wget -q https://raw.githubusercontent.com/GitJournal/GitJournal/master/changelog.yml | |
./build_changelog.sh | |
- name: Cache dependencies | |
uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- run: npm ci | |
- run: npm run build | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
personal_token: ${{ secrets.TOKEN }} | |
external_repository: GitJournal/GitJournal.github.io | |
publish_dir: ./public | |
# keep_files: true | |
user_name: vhanda | |
user_email: [email protected] | |
publish_branch: master | |
# cname: example.com |