Skip to content

pull request deploy #1

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
45 changes: 45 additions & 0 deletions .github/workflows/azure-static-web-apps-green-grass-0dedfff10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Azure Static Web Apps CI/CD

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- master

jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build And Deploy
id: builddeploy
uses: Azure/[email protected]
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_GREEN_GRASS_0DEDFFF10 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match you app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/" # App source code path
api_location: "api" # Api source code path - optional
output_location: "" # Built app content directory - optional
###### End of Repository/Build Configurations ######

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/[email protected]
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_GREEN_GRASS_0DEDFFF10 }}
action: "close"
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,18 @@ jobs:
- name: Build documentation
run: |
source activate pandas-dev
doc/make.py --warnings-are-errors | tee sphinx.log ; exit ${PIPESTATUS[0]}
doc/make.py | tee sphinx.log ; exit ${PIPESTATUS[0]}

- name: Save website as an artifact
uses: actions/upload-artifact@v2
with:
name: website
path: web/build
- name: Save docs as an artifact
uses: actions/upload-artifact@v2
with:
name: docs
path: doc/build/html

# This can be removed when the ipython directive fails when there are errors,
# including the `tee sphinx.log` in te previous step (https://github.com/ipython/ipython/issues/11547)
Expand Down
35 changes: 35 additions & 0 deletions ci/terraform/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# https://github.com/github/gitignore/blob/master/Terraform.gitignore

**/.terraform/*

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.log

# Exclude all .tfvars files, which are likely to contain sentitive data, such as
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
#
*.tfvars

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# Include override files you do wish to add to version control using negated pattern
#
# !example_override.tf

# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*

# Ignore CLI configuration files
.terraformrc
terraform.rc
53 changes: 53 additions & 0 deletions ci/terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions ci/terraform/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
provider "azurerm" {
features {}
}

resource "azurerm_resource_group" "site" {
name = "pandas-site"
location = "Central US"
}

resource "azurerm_storage_account" "storeacc" {
name = "pandaspr"
resource_group_name = azurerm_resource_group.site.name
location = azurerm_resource_group.site.location
account_tier = "Standard"
account_replication_type = "ZRS"

static_website {
index_document = "index.html"
}
}

resource "azurerm_storage_management_policy" "prs" {
storage_account_id = azurerm_storage_account.storeacc.id

# automatically purge old content
# https://docs.microsoft.com/en-us/azure/storage/blobs/storage-lifecycle-management-concepts?tabs=azure-portal#expire-data-based-on-age
rule {
name = "expirationRule"
enabled = true

filters {
blob_types = ["blockBlob"]
}

actions {
base_blob {
delete_after_days_since_modification_greater_than = 14
}
}
}
}

output "container" {
value = azurerm_storage_account.storeacc.primary_web_host
}