Merge pull request #30 from Phosphorus-M/some-modifications #46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to production | |
| env: | |
| PROJECT_NAME: rustlings | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".github/workflows/deploy.yml" | |
| - "package.json" | |
| - "tsconfig.json" | |
| - "nuxt.config.ts" | |
| - "tailwind.config.js" | |
| - "app.vue" | |
| - "components/**" | |
| - "content/**" | |
| - "public/**" | |
| - "layouts/**" | |
| - "server/**" | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: NodeJS Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.OS }}-npm-cache- | |
| - name: Install Deps | |
| run: npm install | |
| - name: Build | |
| env: | |
| NUXT_CLARITY_ID: ${{ secrets.CLARITY_ID }} | |
| run: npm run build | |
| - name: Deploy | |
| uses: cloudflare/wrangler-action@v3 | |
| # env: | |
| # YOUR_SECRET: ${{ secrets.YOUR_SECRET }} | |
| # YOUR_OTHER_SECRET: ${{ secrets.YOUR_OTHER_SECRET }} | |
| with: | |
| wranglerVersion: "4.19.1" | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: deploy | |
| # secrets: | | |
| # YOUR_SECRET | |
| # YOUR_OTHER_SECRET |