From 2faa0ece0ee43a9154755aa2977de89c9a889b81 Mon Sep 17 00:00:00 2001 From: Artur Akmalov Date: Tue, 23 May 2023 23:53:15 +0500 Subject: [PATCH] worflow api --- .github/workflows/deploy.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9a8eaf5..af23e1f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,6 +11,8 @@ jobs: name: github-pages name: Deploy to GitHub Pages runs-on: ubuntu-latest + permissions: + issues: read steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 @@ -30,6 +32,11 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build - - name: GitHub Pages change URL - shell: bash - run: GITHUB_TOKEN=${{secrets.github_token}} ./github-page-url.sh + # - name: GitHub Pages change URL + # run: bash github-page-url.sh + + - name: Use API + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh api --header 'Accept: application/vnd.github+json' --method PUT /repos/akmalovaa/akmalov.com/pages -f cname="test.akmalov.com" -f source={"branch":"gh-pages","path":"/"}