Deploy Website #775
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: Deploy Website | |
on: | |
schedule: | |
- cron: "30 18 * * *" | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Setup Environment Variables | |
run: echo '${{ secrets.ENV_FILE }}' > .env | |
- name: Setup Node | |
uses: actions/setup-node@v2.1.4 | |
with: | |
node-version: 16.x | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --user pipx | |
python -m pipx ensurepath | |
npm ci | |
- name: Test Project | |
run: npm test | |
# Not working currently | |
# - name: Get Books | |
# run: npm run books | |
- name: Build Project | |
run: npm run make | |
- name: Deploy Bundle Report Website | |
run: curl "${{ secrets.BUNDLE_DEPLOY_URL }}" | |
- name: Deploy to Firebase Hosting | |
uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: "${{ secrets.GITHUB_TOKEN }}" | |
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_YASH_TOTALE }}" | |
channelId: live | |
target: public | |
projectId: yash-totale | |
firebaseToolsVersion: 12.9.1 | |
env: | |
FIREBASE_CLI_PREVIEWS: hostingchannels |