diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 898b3fd..895983f 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -25,10 +25,13 @@ jobs: run: | echo "should_run: ${{ steps.check_template.outputs.should_run }}" - build: + build-and-deploy: needs: check_run_conditions if: needs.check_run_conditions.outputs.should_run == 'true' runs-on: ubuntu-latest + env: + SANITY_STUDIO_PROJECT_ID: ${{ vars.SANITY_STUDIO_PROJECT_ID }} + SANITY_STUDIO_DATASET: ${{ vars.SANITY_STUDIO_DATASET }} steps: - name: Check out the repo uses: actions/checkout@v4 @@ -36,14 +39,13 @@ jobs: - name: Setup NodeJS uses: ./.github/actions/setup-node + - name: Install Juno CLI + run: pnpm add -g @junobuild/cli + - name: Build run: pnpm build - name: Deploy to Juno - uses: junobuild/juno-action@main - with: - args: deploy + run: pnpm run deploy env: JUNO_TOKEN: ${{ secrets.JUNO_TOKEN }} - SANITY_STUDIO_PROJECT_ID: ${{ vars.SANITY_STUDIO_PROJECT_ID }} - SANITY_STUDIO_DATASET: ${{ vars.SANITY_STUDIO_DATASET }} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 1b0e944..b86eb46 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,6 +1,3 @@ { - "recommendations": [ - "esbenp.prettier-vscode", - "astro-build.astro-vscode" - ] -} \ No newline at end of file + "recommendations": ["esbenp.prettier-vscode", "astro-build.astro-vscode"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 23fd35f..ad92582 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "editor.formatOnSave": true -} \ No newline at end of file + "editor.formatOnSave": true +} diff --git a/README.md b/README.md index 920e50e..f01952e 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,9 @@ Make sure you have the following installed: 4. Update the `` in the [`juno.config.ts`](./juno.config.ts) file with the new satellite ID. 5. Create a new project with a dataset on Sanity ([guide](https://www.sanity.io/docs/getting-started-with-sanity)). Copy the project ID and the dataset name once done. 6. Set the environment variables in the `.env` file, following the [.env.example](./.env.example) template. -7. Deploy your project with the Juno CLI: +7. Deploy your project on Juno: ```bash - juno deploy + pnpm run deploy ``` You can now access your website at `https://.icp0.io` and the [Sanity Studio](https://www.sanity.io/studio) at `https://.icp0.io/studio`. @@ -48,7 +48,7 @@ You can now access your website at `https://.icp0.io` and the Every time you make a change, you have to deploy your project again with the Juno CLI: ```bash -juno deploy +pnpm run deploy ``` Have a look at the [Set up the GitHub Action](#set-up-the-github-action) and/or [Set up Sanity deployments](#set-up-sanity-deployments) to configure automatic deployments.