Skip to content

Commit

Permalink
Merge pull request #53 from IFRCGo/fix/release-workflow
Browse files Browse the repository at this point in the history
Fix/release workflow
  • Loading branch information
samshara authored Mar 5, 2024
2 parents 652652c + b2cc3d1 commit 06c7d73
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 36 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,35 +22,3 @@ jobs:

- name: Build
run: yarn build

deploy-page:
needs: build
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

defaults:
run:
working-directory: gh-pages

permissions:
contents: read
pages: write
id-token: write

steps:
- uses: actions/checkout@v4

- name: Install + Build
run: docker-compose up page-build

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: gh-pages/out

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
16 changes: 14 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,26 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Wait for npm package to be available
run: |
PACKAGE_NAME="@ifrc-go/icons"
PACKAGE_VERSION=$(cat package.json | grep version | grep -oP "(\d+\.)?(\d+\.)?(\*|\d+)")
# Loop until the package is available in the registry
while [[ -z $(npm show "$PACKAGE_NAME@$PACKAGE_VERSION" version) ]]; do
echo "Waiting for npm package to be available..."
sleep 20 # Adjust the interval as needed
done
echo "npm package is available!"
- name: Install + Build
run: docker-compose up page-build

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: gh-pages/out

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion gh-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"lint": "next lint"
},
"dependencies": {
"@ifrc-go/icons": "^1.3.1",
"@ifrc-go/icons": "^1.3.2",
"@types/node": "20.2.5",
"@types/react": "18.2.7",
"@types/react-dom": "18.2.4",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ifrc-go/icons",
"version": "1.3.1",
"version": "1.3.2",
"description": "IFRC-GO icons library for React.",
"keywords": [
"ifrc-go",
Expand Down

0 comments on commit 06c7d73

Please sign in to comment.