Deploy React Native Benchmarking Versions #65
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
# https://github.com/marketplace/actions/deploy-to-github-pages | |
name: Deploy React Native Benchmarking Versions | |
on: | |
workflow_dispatch: # Allows the workflow to be triggered manually | |
permissions: | |
contents: write # Allows writing to the repository's contents | |
jobs: | |
deploy-react-native-page: | |
if: github.ref == 'refs/heads/main' # Runs only if the current branch is 'main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Build | |
working-directory: WebpageRevamped | |
env: | |
REACT_APP_GOOGLE_ANALYTICS_TOKEN: ${{ secrets.REACT_APP_GOOGLE_ANALYTICS_TOKEN }} # Using secret to set environment variable | |
run: | | |
yarn install | |
yarn build | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: ./WebpageRevamped/build | |
branch: gh-pages |