Merge pull request #6 from embassy-rs/frontpage-updates #12
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: Publish | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: { } | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Zola | |
run: | | |
wget -q -O - "https://github.com/getzola/zola/releases/download/v0.16.1/zola-v0.16.1-x86_64-unknown-linux-gnu.tar.gz" | tar xzf - -C /usr/local/bin | |
- name: Publish | |
shell: bash | |
run: | | |
zola build | |
mkdir -p ~/.kube | |
echo "${{secrets.KUBECONFIG}}" > ~/.kube/config | |
POD=$(kubectl -n embassy get po -l app=website -o jsonpath={.items[0].metadata.name}) | |
TEMP=$(kubectl exec $POD -- mktemp -d) | |
kubectl cp public $POD:$TEMP | |
kubectl exec $POD -- bash -c "mkdir -p /usr/share/nginx/html && cp -R $TEMP/public/. /usr/share/nginx/html/ && rm -rf $TEMP" |