# Introduction
These are my notes in my experience when reading and reproducing the following articles:
- Deploying to Vercel from an organization for free using GitHub actions (opens new window)
- Nextjs CI/CD on Vercel with Github actions (opens new window)
- Here is the GitHub Action repo: amondnet/vercel-action (opens new window)
# repo, branches and tree
➜ nextra-casiano-rodriguez-leon-alu0100291865 git:(guide) git remote -v
origin https://github.com/ULL-MII-SYTWS-2425/nextra-casiano-rodriguez-leon-alu0100291865.git (fetch)
upstream https://github.com/ULL-MII-SYTWS-2425/ull-mii-sytws-2425-nextra-nextra-docs-template.git (fetch)
➜ nextra-casiano-rodriguez-leon-alu0100291865 git:(guide) git -P branch -a
allrepos
auth
auth2024
dmsi20241028
* guide
loading-message
main
middleware
remotes/origin/HEAD -> origin/main
remotes/origin/allrepos
remotes/origin/auth
remotes/origin/guide
remotes/origin/main
remotes/upstream/main
➜ nextra-casiano-rodriguez-leon-alu0100291865 git:(guide) tree -I screeenshot.png .github
.github
└── workflows
└── deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Vercel cli
➜ docs git:(main) vercel --version
Vercel CLI 39.1.3
39.1.3
1
2
3
2
3
# .github/workflows/deploy.yml
➜ nextra-casiano-rodriguez-leon-alu0100291865 git:(guide) cat .github/workflows/deploy.yml
# vercel-merge.yml
name: Deploy to vercel on merge
on:
push:
branches:
- guide
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-args: '--prod'
vercel-org-id: ${{ secrets.ORG_ID}}
vercel-project-id: ${{ secrets.PROJECT_ID}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Secrets
# The workflow running in GitHub
# Errors and Fixing them
The building finishes, but after it, there is a warning followed by an error:
Warning: The `set-output` command is deprecated and will be disabled soon.
Please upgrade to using Environment Files.
For more information see:
https://github.blog/changelog2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
this is push event
find comment
previous comment not found
Error: Resource not accessible by integration
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
See the following issues at the action repo:
- issue set-output command warning #217 (opens new window) a
- issue Resource not accessible by integration #235 (opens new window)
You need to grant both read and write permissions for the workflows in the repository and the organisation, if the repo is part of one. See this topic: https://github.com/orgs/community/discussions/21061 (opens new window)
The change must be done by an owner of the organization:
Once it is done, the action runs successfully: