From 1294a291e1a0edee14b34b9136443dd3292b2292 Mon Sep 17 00:00:00 2001
From: Yuki Okushi <huyuumi.dev@gmail.com>
Date: Thu, 15 Oct 2020 09:48:30 +0900
Subject: [PATCH] Upload documentation to gh-pages from GHA

---
 .github/workflows/docs.yml | 25 +++++++++++++++++++++++++
 ci/azure-master.yml        | 22 ----------------------
 2 files changed, 25 insertions(+), 22 deletions(-)
 create mode 100644 .github/workflows/docs.yml
 delete mode 100644 ci/azure-master.yml

diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 00000000..33580940
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,25 @@
+name: Upload documentation
+
+on:
+  push:
+    branches:
+      - master
+
+jobs:
+  upload_docs:
+    name: Upload documentation
+    runs-on: ubuntu-18.04
+    if: github.repository == 'rust-lang/libc'
+
+    steps:
+      - uses: actions/checkout@v2
+      - name: Setup Rust toolchain
+        run: TARGET=x86_64-unknown-linux-gnu sh ./ci/install-rust.sh
+      - name: Generate documentation
+        run: LIBC_CI=1 sh ci/dox.sh
+      - name: Upload documentation to GitHub Pages
+        uses: rust-lang/simpleinfra/github-actions/static-websites@master
+        with:
+          deploy_dir: target/doc
+          github_token: "${{ secrets.GITHUB_TOKEN }}"
+        if: github.ref == 'refs/heads/master'
diff --git a/ci/azure-master.yml b/ci/azure-master.yml
deleted file mode 100644
index c61e2b4c..00000000
--- a/ci/azure-master.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-variables:
-  - group: secrets
-resources:
-  repositories:
-    - repository: rustinfra
-      type: github
-      name: rust-lang/simpleinfra
-      endpoint: gnzlbg
-trigger: ["master"]
-pr: ["master"]
-
-jobs:
-  - job: StyleAndDocs
-    pool:
-      vmImage: ubuntu-18.04
-    steps:
-      - template: azure-install-rust.yml
-      - script: LIBC_CI=1 sh ci/dox.sh
-        displayName: Generate documentation
-      - template: azure-configs/static-websites.yml@rustinfra
-        parameters:
-          deploy_dir: target/doc
-- 
GitLab