diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..87e6963f --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,42 @@ +name: Build and Deploy +on: + push: + branches: + - main # Set a branch to deploy + pull_request: + +permissions: + contents: write +jobs: + build-and-deploy: + runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + + - uses: szenius/set-timezone@v1.0 + with: + timezoneLinux: "Europe/Prague" + + - name: Cache + run: make cache + + - name: Test + run: make test + + - name: Test + run: make build + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: dist # The folder the action should deploy. \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da93a9b2..e450ce99 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: branches: - main # Set a branch to deploy pull_request: - + jobs: deploy: runs-on: ubuntu-latest