File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+
11+ container : pandoc/latex
12+
13+ steps :
14+ - uses : actions/checkout@v2
15+ - name : Install mustache (to update the date)
16+ run : apk add ruby && gem install mustache
17+ - name : creates output
18+ run : sh ./build.sh
19+ - name : Pushes to another repository
20+ id : push_directory
21+ uses : cpina/github-action-push-to-another-repository@main
22+ env :
23+ API_TOKEN_GITHUB : ${{ secrets.AUTO_ACTIONS }}
24+ with :
25+ source-directory : " output"
26+ destination-github-username : JeonSuna
27+ destination-repository-name : TechFork-Front
28+ user-email : ${{ secrets.EMAIL }}
29+ commit-message : ${{ github.event.commits[0].message }}
30+ target-branch : main
31+ - name : Test get variable exported by push-to-another-repository
32+ run : echo $DESTINATION_CLONED_DIRECTORY
Original file line number Diff line number Diff line change 1+ name : Preview
2+
3+ on :
4+ pull_request :
5+ branches : ["main"]
6+
7+ jobs :
8+ vercel-preview :
9+ runs-on : ubuntu-latest
10+
11+ env :
12+ VERCEL_ORG_ID : ${{ secrets.VERCEL_ORG_ID }}
13+ VERCEL_PROJECT_ID : ${{ secrets.VERCEL_PROJECT_ID }}
14+
15+ steps :
16+ - uses : actions/checkout@v4
17+ - name : Install Vercel CLI
18+ run : npm install --global vercel@latest && npm install --global pnpm
19+ - name : Get Vercel Environment Variables
20+ run : vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
21+ - name : Build Project Artifacts
22+ run : vercel build --token=${{ secrets.VERCEL_TOKEN }}
23+ - name : Deploy Project Artifacts to Vercel
24+ id : deploy
25+
26+ run : |
27+
28+ vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > vercel-output.txt
29+ echo "preview_url=$(cat vercel-output.txt)" >> $GITHUB_OUTPUT
30+
31+ - name : Comment PR with Preview URL
32+ uses : thollander/actions-comment-pull-request@v2
33+ with :
34+ message : |
35+ ✅ PREVIEW ${{ steps.deploy.outputs.preview_url }}
36+
37+ permissions :
38+ contents : read
39+ pages : write
40+ deployments : write
41+ id-token : write
42+ issues : write
43+ pull-requests : write
Original file line number Diff line number Diff line change 1+ cd ../
2+ mkdir output
3+ cp -R ./TechFork-Front/* ./output
4+ cp -R ./output ./TechFork-Front/
You can’t perform that action at this time.
0 commit comments