stories: update CA story #42
This file contains 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: Main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source repo | |
uses: actions/checkout@v2 | |
with: | |
repository: hallaji/website | |
ref: main | |
token: ${{ secrets.REPO_PAT }} | |
- name: Checkout content repo to posts directory | |
uses: actions/checkout@v2 | |
with: | |
ref: main | |
path: posts | |
- name: Checkout content repo to public directory | |
uses: actions/checkout@v2 | |
with: | |
ref: main | |
path: public | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '18.13' | |
- name: Remove unnecessary files and directories | |
run: | | |
find ./posts -iname '.*' -exec rm -rf {} + | |
find ./public -iname '.*' -exec rm -rf {} + | |
find ./public -type f -iname '*.md' -exec rm -rf {} + | |
- name: Vercel | |
run: | | |
mkdir .vercel | |
export PROJECT="{\"projectId\":\"${{ secrets.VERCEL_PROJECT_ID }}\",\"orgId\":\"${{ secrets.VERCEL_ORG_ID }}\"}" | |
echo $PROJECT > .vercel/project.json | |
npm i -g vercel | |
vercel --confirm --prod --token=${{ secrets.VERCEL_TOKEN }} |