Update Node.js to v22 #2004
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: Build Website | |
on: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Login to Quay.io Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAYIO_USERNAME }} | |
password: ${{ secrets.QUAYIO_TOKEN }} | |
- | |
name: Build and Push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: | | |
quay.io/acend/website-hugo:pr-${{ github.event.pull_request.number }} | |
- | |
name: 'Install Helm' | |
uses: azure/setup-helm@v4 | |
with: | |
version: v3.6.2 | |
- | |
name: Install Kubectl | |
uses: azure/setup-kubectl@v4 | |
with: | |
version: v1.21.2 | |
- | |
name: Create KUBECONFIG | |
env: | |
KUBE_CONFIG: '${{ secrets.KUBECONFIG_K8S_ACEND_TEST }}' | |
run: | | |
mkdir -p $HOME/.kube | |
echo "$KUBE_CONFIG" > $HOME/.kube/config | |
- | |
name: Deploy Helm Release | |
env: | |
WEBSITE_HELM_RELEASE: 'pr-${{ github.event.pull_request.number }}' | |
WEBSITE_NAMESPACE: 'acend-website-test' | |
WEBSITE_VERSION: '${{ github.sha }}' | |
run: | | |
helm upgrade --install --wait --kubeconfig $HOME/.kube/config --namespace=$WEBSITE_NAMESPACE --set=app.name=$WEBSITE_HELM_RELEASE --set=app.version=$WEBSITE_VERSION --values=helm-chart/values.yaml --atomic $WEBSITE_HELM_RELEASE ./helm-chart | |
- | |
name: Redeploy Deployments | |
env: | |
WEBSITE_HELM_RELEASE: 'pr-${{ github.event.pull_request.number }}' | |
WEBSITE_NAMESPACE: 'acend-website-test' | |
run: | | |
kubectl rollout restart deployment/${WEBSITE_HELM_RELEASE}-acend-website --kubeconfig $HOME/.kube/config --namespace $WEBSITE_NAMESPACE | |
- | |
name: Comment PR Environments in PR | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
message: | | |
PR Environments: | |
* acend website <https://website-pr-${{ github.event.pull_request.number }}.test.acend.ch> | |