From 3ab869cf60477073d1bf3ff1a99f549c919f91ee Mon Sep 17 00:00:00 2001 From: Evgen Nikolenko <93652088+enikosoft@users.noreply.github.com> Date: Mon, 15 Apr 2024 17:45:48 +0300 Subject: [PATCH] Create delpoy.yml --- .github/workflows/delpoy.yml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/delpoy.yml diff --git a/.github/workflows/delpoy.yml b/.github/workflows/delpoy.yml new file mode 100644 index 0000000..7251e66 --- /dev/null +++ b/.github/workflows/delpoy.yml @@ -0,0 +1,49 @@ +name: Deploy static content to Pages + +on: + push: + branches: ['main'] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: 'pages' + cancel-in-progress: true + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + - name: Build + env: + VITE_WEATHER_API_URL: ${{ secrets.VITE_WEATHER_API_URL }} + VITE_WEATHER_API_KEY: ${{ secrets.VITE_WEATHER_API_KEY }} + VITE_GOOGLE_API_KEY: ${{ secrets.VITE_GOOGLE_API_KEY }} + run: | + npm ci + npm run check.types + npm run build + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload dist folder + path: './dist' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4