diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index 4a4d8b9..84a42a1 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -7,6 +7,9 @@ jobs: lint: name: Lint runs-on: ubuntu-latest + defaults: + run: + working-directory: ./frontend steps: - name: Git checkout uses: actions/checkout@v3 @@ -15,6 +18,7 @@ jobs: - uses: actions/setup-node@v4 with: + cache-dependency-path: ./frontend/package-lock.json node-version: 22.5 cache: 'npm' diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4ce939d..26d7ad9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,42 +1,67 @@ name: Deploy on: - push: - branches: [ main ] - workflow_dispatch: + push: + branches: [main] + workflow_dispatch: + +env: + NOMAD_VERSION: 1.7.7 jobs: - wait: - name: Wait for tests - runs-on: ubuntu-latest - steps: - - name: Wait for tests - uses: lewagon/wait-on-check-action@v1.3.4 - with: - ref: ${{ github.ref }} - check-name: Lint - repo-token: ${{ secrets.GITHUB_TOKEN }} - wait-interval: 10 - - deploy: - runs-on: ubuntu-latest - needs: - - wait - - steps: - - name: Git checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - # See the following link for documentation: - # https://github.com/marketplace/actions/dokku - - name: Push to medusa - uses: dokku/github-action@v1.4.0 - with: - ssh_private_key: ${{ secrets.MEDUSA_GLOBAL_DEPLOY_KEY }} - git_remote_url: ssh://dokku@medusa.datasektionen.se/bea - # force might feel risky, but there is no good reason why the server - # should ever not be a mirror of the deploy branch. And the errors we - # could get otherwise would probably be nasty to deal with - git_push_flags: --force + wait: + name: Wait for tests + runs-on: ubuntu-latest + steps: + - name: Wait for tests + uses: lewagon/wait-on-check-action@v1.3.4 + with: + ref: ${{ github.ref }} + check-name: Lint + repo-token: ${{ secrets.GITHUB_TOKEN }} + wait-interval: 10 + deploy: + runs-on: ubuntu-latest + needs: + - wait + + steps: + - name: Git checkout + uses: actions/checkout@v4 + + - name: Set environment variables + run: | + cat >> "$GITHUB_ENV" <