Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix usage #29

Merged
merged 5 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 5 additions & 18 deletions .github/workflows/build-somnia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,9 @@ on:
types: [opened, reopened, synchronize, labeled]

jobs:
set-env:
runs-on: ubuntu-latest
outputs:
env: ${{ steps.set_env.outputs.env }}
steps:
- name: Set env
id: set_env
run: |
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "::set-output name=env::somnia-prod"
else
echo "::set-output name=env::somnia-test"
fi

build:
runs-on: ubuntu-latest
timeout-minutes: 15
needs: set-env
environment:
name: ${{ needs.set-env.outputs.env }}
steps:
- uses: actions/checkout@v4
- name: Get Cache Key
Expand Down Expand Up @@ -93,7 +76,11 @@ jobs:
yarn run nx run somnia:build:production
- name: echos
run: |
echo ${{ vars.ENV_NAME }} > environment
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "somnia-prod" > environment
else
echo "somnia-test" > environment
fi
echo $(git rev-parse HEAD) > ref
echo ${{ contains(github.event.pull_request.labels.*.name, 'deploySomnia') }} > shouldDeploy
- name: Archive build
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-somnia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
- name: Set env
id: set_env
run: |
echo "::set-output name=env::$(cat somnia-build/environment)"
echo "::set-output name=shouldDeploy::$(cat somnia-build/shouldDeploy)"
echo "env=$(cat somnia_build/environment)" >> $GITHUB_OUTPUT
echo "shouldDeploy=$(cat somnia_build/shouldDeploy)" >> $GITHUB_OUTPUT

deploy:
runs-on: ubuntu-latest
Expand All @@ -48,7 +48,7 @@ jobs:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Setup config.json
run: |
printf '%s' "$CONFIG" > dist/apps/somnia/apps/somnia/src/config.json
printf '%s' "$CONFIG" > somnia_build/dist/apps/somnia/apps/somnia/src/config.json
env:
CONFIG: ${{ secrets.SOMNIA_CREDENTIALS }}
- name: 'Deploy to Azure Web App'
Expand All @@ -57,4 +57,4 @@ jobs:
with:
app-name: ${{ vars.ENV_NAME }}
slot-name: 'Production'
package: somnia-build/dist/apps/somnia
package: somnia_build/dist/apps/somnia
1 change: 1 addition & 0 deletions apps/somnia/.yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
network-timeout 240000
5 changes: 5 additions & 0 deletions apps/somnia/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
"input": "libs/gi/localization/assets/locales",
"output": "assets/gi/locales",
"glob": "**"
},
{
"input": "./apps/somnia/",
"output": "",
"glob": ".yarnrc"
}
],
"generatePackageJson": true,
Expand Down
Loading