diff --git a/.github/workflows/gh_pages.yaml b/.github/workflows/gh_pages.yaml deleted file mode 100644 index c9b3838..0000000 --- a/.github/workflows/gh_pages.yaml +++ /dev/null @@ -1,46 +0,0 @@ -name: Github Pages - -on: - release: - types: [published] - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Install Node (20.x) - uses: actions/setup-node@v4 - with: - node-version: '20.x' - - - name: Install Dependencies - run: yarn install - - - name: Build - run: yarn build - - - name: Checkout GH pages - uses: actions/checkout@v4 - with: - repository: stellar/open-rpc-docs-react - ref: gh-pages - path: docs - - - name: Generate docs - continue-on-error: true - run: yarn build:docs - - - name: Publish docs - run: | - TAG=`git describe --tags` - cd docs/ - git config user.name github-actions - git config user.email github-actions@github.com - git add . - git commit -m $TAG - git push origin gh-pages diff --git a/.github/workflows/npm_publish.yaml b/.github/workflows/npm_publish.yaml index a047759..02e343e 100644 --- a/.github/workflows/npm_publish.yaml +++ b/.github/workflows/npm_publish.yaml @@ -6,7 +6,7 @@ on: types: [published] jobs: - build: + publish: runs-on: ubuntu-latest steps: - name: Checkout @@ -19,14 +19,18 @@ jobs: registry-url: 'https://registry.npmjs.org' always-auth: true + - name: Setup .yarnrc.yml + run: yarn config set npmAuthToken $NODE_AUTH_TOKEN + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Install Depencencies run: yarn install - name: Build, Test, and Package run: yarn prepack && yarn test - - name: Publish npm package to both places - run: | - yarn npm publish --access public + - name: Publish npm package to the registry + run: yarn npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}