From d5bb2967bf1e884133b994c7dd65f81fbcf0913a Mon Sep 17 00:00:00 2001 From: Josh Kearney Date: Fri, 26 Apr 2024 02:05:22 -0700 Subject: [PATCH] Convert the CircleCI workflow to a GitHub Actions workflow (#861) Summary: This pull request converts the CircleCI workflows to GitHub actions workflows. [Github Actions Importer](https://github.com/github/gh-actions-importer) was used to convert the workflows initially, then I edited them manually to correct errors in translation. **Issues** 1. _facebook/idb/build_and_deploy -> deploy-website_ ``` Error: Running "git push" command failed. Does the GitHub user account you are using have push access to the repository? ``` This is due to the fact that `${{ secrets.GITHUB_TOKEN }}` is either undefined or doesn't have the appropriate permissions or scopes enabled to access the repository. ## How did you test this change? I tested these changes in a [forked repo](https://github.com/robandpdx-org/idb/actions/runs/7717454971). https://fburl.com/workplace/f6mz6tmw Pull Request resolved: https://github.com/facebook/idb/pull/861 Reviewed By: Nekitosss Differential Revision: D56620612 Pulled By: jbardini fbshipit-source-id: 00b543d0019df4b59324d96582cce321a82c331a --- .github/workflows/build_and_deploy.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/build_and_deploy.yml diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml new file mode 100644 index 000000000..782644d65 --- /dev/null +++ b/.github/workflows/build_and_deploy.yml @@ -0,0 +1,20 @@ +name: facebook/idb/build_and_deploy +on: + push: + branches: + - main +jobs: + deploy-website: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.0 + - uses: actions/setup-node@v4 + with: + node-version: 16.14.0 + - name: Deploying to GitHub Pages + run: | + git config --global user.email "docusaurus-bot@users.noreply.github.com" + git config --global user.name "Website Deployment Script" + echo "machine github.com login docusaurus-bot password ${{ secrets.GITHUB_TOKEN }}" > ~/.netrc + echo "Deploying website..." + cd website && yarn install && GIT_USER=docusaurus-bot USE_SSH=false yarn deploy