Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy

on:
push:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest
container: pandoc/latex
steps:
- uses: actions/checkout@v2

- name: Install mustache (to update the date)
run: apk add ruby && gem install mustache

- name: creates output
run: ./build.sh

- name: Pushes to another repository
id: push_directory
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.AUTO_ACTIONS }}
with:
source-directory: "output"
destination-github-username: cks-wls
destination-repository-name: Frontend-G2G
user-email: ${{ secrets.EMAIL }}
commit-message: ${{ github.event.commits[0].message }}
target-branch: main

- name: Test get variable exported by push-to-another-repository
run: echo $DESTINATION_CLONED_DIRECTORY
43 changes: 43 additions & 0 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Preview

on:
pull_request:
branches: ["main"]

jobs:
vercel-preview:
runs-on: ubuntu-latest

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

steps:
- uses: actions/checkout@v4
- name: Install Vercel CLI
run: npm install --global vercel@latest && npm install --global pnpm
- name: Get Vercel Environment Variables
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
id: deploy

run: |

vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > vercel-output.txt
echo "preview_url=$(cat vercel-output.txt)" >> $GITHUB_OUTPUT

- name: Comment PR with Preview URL
uses: thollander/actions-comment-pull-request@v2
with:
message: |
✅ PREVIEW ${{ steps.deploy.outputs.preview_url }}

permissions:
contents: read
pages: write
deployments: write
id-token: write
issues: write
pull-requests: write
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
G2G
G2G(Good to Grow)
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
cd ../
mkdir output
cp -R ./Frontend-G2G/* ./output
cp -R ./output ./Frontend-G2G/
Loading