feat: adding GreenCart (#269) #432
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: Build app list and deploy website | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build distribution | |
run: npm run build | |
- name: Deploy apps source website | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: dist/ | |
force_orphan: true | |
- name: Checkout apps repo | |
if: ${{ github.repository_owner == 'vechain' }} | |
uses: actions/checkout@v3 | |
with: | |
repository: 'vechain/app-hub-app' | |
path: 'website' | |
- name: Build website | |
if: ${{ github.repository_owner == 'vechain' }} | |
run: cd website && npm ci && npm install ../dist && npm run build | |
- name: Deploy website | |
if: ${{ github.repository_owner == 'vechain' }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
personal_token: ${{ secrets.PERSONAL_TOKEN }} | |
publish_dir: website/dist/ | |
cname: apps.vechain.org | |
force_orphan: true | |
external_repository: vechain/app-hub-app |