Skip to content

Build production

Build production #40

Workflow file for this run

name: Build production
on:
release:
types: [created]
workflow_dispatch:
jobs:
build-docker-image-production:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push pacifista-website pterodactyl dockerfile
run: |
docker build . --tag ghcr.io/pacifistamc/pacifista-website:latest
docker push ghcr.io/pacifistamc/pacifista-website:latest
update-kubernetes-cluster:
needs:
- build-docker-image-production
runs-on: ubuntu-latest
environment:
name: production
url: https://pacifista.fr
steps:
- name: Set up kubectl
uses: azure/k8s-set-context@v3
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
env:
KUBECONFIG: ${{ secrets.KUBECONFIG }}
- name: Checkout source code
uses: actions/checkout@v3
- name: Update Kubernetes Cluster
run: cd kubernetes && chmod +x ./deploy.sh && ./deploy.sh