diff options
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/earthly.yml | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/.github/workflows/earthly.yml b/.github/workflows/earthly.yml index 272292e..b76055e 100644 --- a/.github/workflows/earthly.yml +++ b/.github/workflows/earthly.yml @@ -45,21 +45,12 @@ jobs: name: "Deploy xesite" needs: build runs-on: alrest-xe-site + if: github.ref == 'refs/heads/main' permissions: contents: read - if: github.ref == 'refs/heads/main' steps: - uses: actions/checkout@v4 - - uses: azure/setup-kubectl@v4 - - name: Save Civo kubeconfig - run: | - curl -sL https://civo.com/get | sudo sh - civo apikey add default $CIVO_TOKEN - civo apikey current default - civo kubernetes config --region phx1 aeacus --save --switch - env: - CIVO_TOKEN: ${{ secrets.CIVO_TOKEN }} - uses: dorny/paths-filter@v3 id: changes with: @@ -73,6 +64,17 @@ jobs: - 'go.sum' - 'Earthfile' - 'manifest/**/*.yaml' + - uses: azure/setup-kubectl@v4 + if: steps.changes.outputs.src == 'true' + - name: Save Civo kubeconfig + if: steps.changes.outputs.src == 'true' + run: | + curl -sL https://civo.com/get | sudo sh + civo apikey add default $CIVO_TOKEN + civo apikey current default + civo kubernetes config --region phx1 aeacus --save --switch + env: + CIVO_TOKEN: ${{ secrets.CIVO_TOKEN }} - name: "Deploy" if: steps.changes.outputs.src == 'true' run: | |
