Skip to content

Commit

Permalink
Convert the CircleCI workflow to a GitHub Actions workflow (#861)
Browse files Browse the repository at this point in the history
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: #861

Reviewed By: Nekitosss

Differential Revision: D56620612

Pulled By: jbardini

fbshipit-source-id: 00b543d0019df4b59324d96582cce321a82c331a
  • Loading branch information
jk0 authored and facebook-github-bot committed Apr 26, 2024
1 parent 69a2f58 commit d5bb296
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .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

0 comments on commit d5bb296

Please sign in to comment.