Add the Wake On Lan Server article #48
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: pull_request | |
env: | |
REPO_NAME: ${{ github.event.repository.name }} | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
container: | |
image: docker.io/library/alpine:latest | |
options: --privileged | |
steps: | |
- name: Update container | |
run: apk update && apk upgrade | |
- name: Install packages | |
run: apk add git hugo | |
- name: Clone repo and configure git | |
run: | | |
git clone https://github.com/$GITHUB_REPOSITORY | |
cd $REPO_NAME | |
git checkout $GITHUB_HEAD_REF | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "[email protected]" | |
git remote set-url origin "https://${{ secrets.BUILD_WEBSITE_TOKEN }}@github.com/$GITHUB_REPOSITORY.git" | |
- name: Build website | |
run: | | |
cd $REPO_NAME | |
if [ "$(git log -n 1 --pretty=format:%an)" != "GitHub Actions" ]; then | |
rm -rf public && hugo | |
else | |
echo "Website already built in the latest commit" | |
fi | |
- name: Commit automated build | |
run: | | |
cd $REPO_NAME | |
if [ "$(git status --porcelain)" ]; then | |
git add . | |
git commit -m "Automated build" | |
git push | |
else | |
echo "No changes to commit" | |
fi | |
Test: | |
runs-on: ubuntu-latest | |
container: | |
image: docker.io/library/alpine:latest | |
options: --privileged | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v3 | |
- name: Update container | |
run: apk update && apk upgrade | |
- name: Install packages | |
run: apk add py3-pip ruby && pip install codespell && gem install mdl | |
- name: Run codespell | |
run: codespell --enable-colors content | |
- name: Run mdl | |
run: mdl --style .github/workflows/mdl_style.rb README.md content |