update build infrastructure #161
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: Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Pull the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup missing directories and files on the runner | |
run: | | |
mkdir -p ~/.ssh | |
touch ~/.gitconfig | |
- name: Prepare container | |
uses: devcontainers/[email protected] | |
with: | |
imageName: website # Local name only | |
imageTag: latest # Local tag only | |
push: never | |
- name: Deploy | |
uses: devcontainers/[email protected] | |
with: | |
imageName: website | |
imageTag: latest | |
push: never | |
runCmd: | | |
git config --global user.name "web_bot" | |
git config --global user.email "[email protected]" | |
make prod | |
git checkout gh-pages | |
cp -R _site/deploy/* . | |
git add . | |
git commit --allow-empty -m "update" | |
git push https://github.com/shanteacontrols/website gh-pages |