Run the following command.
Follow the instruction. (an URL appears or you will be navigated to the page, and then approve to grant permissions to the token.) Then, the token appears on your console.
To make a token usable as an environment variable in CircleCI, save your token as name
FIREBASE_TOKEN by one of the ways below:
Save the below YAML as
version: 2 jobs: build: docker: - image: cibuilds/hugo:latest steps: - checkout - run: mkdir public - run: hugo - persist_to_workspace: root: . paths: - . deploy: docker: - image: circleci/node:latest steps: - attach_workspace: at: . - run: npm install firebase-tools - run: ./node_modules/.bin/firebase deploy --token=$FIREBASE_TOKEN workflows: version: 2 build-deploy: jobs: - build - deploy: requires: - build filters: branches: only: master
What this setting is doing is…
cibuilds/hugo:latestimage, generating static files in
./public, then persist the workspace.
firebase-tools, then deploying.
workflows part defines the dependency, and filtering branch to trigger CI or not.